<%@ include file="public/include.jsp" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <link rel="stylesheet" type="text/css" href="styles/pub/default.css" >
  <script type="text/javascript" src="scripts/pub/jquery.js"></script>
  <script type="text/javascript" src="scripts/pub/common.js"></script>
  <script type="text/javascript" src="scripts/check.js"></script>
</head>

<body>
<div class="main" style="width:80%;">
	<table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
	  <caption>
		  手工提取报检单
	  </caption>
	  <tr height="30"><td align="center"></td></tr>
	    <tr>
	      <td>
			<form action="HandGetDecl.do" method="post">
	        <table border="0" style="width:90%;">
	          <c:if test="${map.cdecl.errorInfo!=null}"><tr>
	         	<td align="center"><span class="warning" style="font-size:14px;">${map.cdecl.errorInfo}</span></td>
	          </tr></c:if>
	          <tr height="40">
	            <td align="center">报检号 
	            	<input type="text" id="declNo" name="declNo" value="${map.cdecl.declNo}">&nbsp;&nbsp;
	            	<input type="submit" value=" 提 取 " onclick="return validateDeclNumber();" />&nbsp;
	              	<input type="button" value=" 清 空 " onclick="clearInput();" />
	            </td>
	          </tr>
	        </table>
	       	</form>
	      </td>
	    </tr>
	  
	  	<c:if test="${map.declPrep!=null}">
	    	<tr height="40"><td align="center" valign="bottom" style="font-size:16px;">报检单预览</td></tr>
			<c:set var="decl" value="${map.declPrep}"></c:set>
		    <tr>
		      <td align="center">
				<table  class="bean">
					<tr class="size">
					  <td width="11%"></td>
					  <td width="28%"></td>
					  <td width="11%"></td>
					  <td width="23%"></td>
					  <td width="11%"></td>
					  <td width="23"></td>
					</tr>
					<tr>
					  <td class="formLabel" >报检号</td>
					  <td colspan="3">${decl.declNo}</td>
					  <td class="formLabel" >报检日期</td>
					  <td colspan="1"><fmt:formatDate value="${decl.declDate}"  pattern="yyyy-MM-dd"/></td>
					</tr>
					<tr>
					  <td class="formLabel" >报检单位</td>
					  <td>${decl.entName}</td>
					  <td class="formLabel" >单位注册号</td>
					  <td>${decl.declRegNo}</td>
					  <td class="formLabel" >用途</td>
					  <td><mytag:c2s key="${decl.purposeCode}" type="usage"/></td>
					</tr>
					<tr>
					  <td class="formLabel" >发货人(中)</td>
					  <td>${decl.consignorCname}</td>
					  <td class="formLabel" >发货人(英)</td>
					  <td>${decl.consignorEname}</td>
					  <td class="formLabel" >存放地点</td>
					  <td>${decl.goodsPlace}</td>
					  
					</tr>
					<tr>
					  <td class="formLabel" >收货人(中)</td>
					  <td>${decl.consigneeCname}</td>
					  <td class="formLabel" >收货人(英)</td>
					  <td>${decl.consigneeEname}</td>
					  <td class="formLabel" >提单/运单号</td>
					  <td>${decl.carrierNoteNo}</td>
					</tr>
					<tr>
					  <td class="formLabel" >贸易国家/地区</td>
					  <td><mytag:c2s key="${decl.tradeCountryCode}" type="country"/></td>
					  <td class="formLabel" >贸易方式</td>
					  <td><mytag:c2s key="${decl.tradeModeCode}" type="trade"/></td>
					  <td class="formLabel" >合同号</td>
					  <td>${decl.contractNo}</td>
					</tr>
					<tr>
					  <td class="formLabel" >启运国家/地区</td>
					  <td><mytag:c2s key="${decl.despCountryCode}" type="country"/></td>
					  <td class="formLabel" >启运口岸</td>
					  <td><mytag:c2s key="${decl.despPortCode}" type="port"/></td>
					  <td class="formLabel" >合同特殊条款</td>
					  <td>${decl.specialRequire}</td>
					</tr>
					<tr>
					  <td class="formLabel" >标记及号码</td>
					  <td>${decl.markNo}</td>
					  <td class="formLabel" >随附单据</td>
					  <td colspan="3"><mytag:c2s type="impNote" key="${decl.sheetTypeCodes}" mutliKey="true" keyLength="1"/></td>
					</tr>
				</table>
		      </td>
		    </tr>
		    
		    <tr><td height="20"></td></tr>
		    
	   	    <tr>
		      <td align="center">
				<table class="list">
		            <tr class="title">
			          <td width="4%">序号</td>
		              <td>货物名称</td>
		              <td width="10%">HS编码</td>
		              <td width="6%">监管类别</td>
		              <td width="9%">原产国/地区<br/></td>
		              <td width="9%">数量</td>
		              <td width="9%">重量</td>
		              <td width="10%">货物总值</td>
		              <td width="9%">包装</td>
		            </tr>
		            <c:forEach items="${map.goodsList}" varStatus="stat" var="goods">
		             <c:set var="linecout" value="${stat.count}"/>
		             <tr >
		             	<td>${stat.count}</td>
		            	<td>${goods.goodsCname}</td>
		            	<td>${goods.hsCode}</td>
		            	<td>${goods.inspMonitorCond}</td>
		            	<td><mytag:c2s key="${goods.originCountryCode}" type="country"/></td>
		            	<td>${goods.qty}<mytag:c2s key="${goods.qtyUnitCode}" type="measure"/></td>
		            	<td>${goods.weight}<mytag:c2s key="${goods.weightUnitCode}" type="measure"/></td>
		            	<td>${goods.goodsValues}<mytag:c2s key="${goods.ccy}" type="money"/></td>
		            	<td>${goods.packNumber}<mytag:c2s key="${goods.packTypeCode}" type="pack"/></td>
		             </tr>
		            </c:forEach>
				</table>	      
		      </td>
		    </tr>

			<tbody >			  
			  <form action="FetchDecl.do" method="post">
			  	<tr height="50">
			      <td align="center" valign="bottom" style="font-size:14px;font-weight:600;">
			      	<span>
			      		指定备案号:<input type="text" id="backupCode" name="backupCode" value="${map.cdecl.backupCode}" readonly="readonly"
			      				onclick="openBackupCodeSearchWin('SearchBackupCode.do','code=${map.cdecl.backupCode}')"></span>&nbsp;&nbsp;
			      	<span>
			      	类别:<select id="type" name="type">
							<option value="">请选择</option>
							<option value="A">贸易类</option>
							<option value="B">非贸易类</option>
						</select>
			      	</span>
			      </td>
			    </tr>
			    <tr height="30">
			      <td align="center"  valign="middle">
			      		<input type="hidden" id="fetchDeclNo" name="declNo" value="${decl.declNo}" />
						<span><input type="submit" class="button" value=" 确定取单 " onclick="return submitFetchDecl();"></span>
			      </td>
			    </tr>
			  </form>
		     </tbody>
	    </c:if>
	</table>
</div>
</body>
</html>
